@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal">
            <div class="row">
                <div class="col-sm-12 b-r">
                    <input type="hidden" value="${orgId }" id="orgId"/>
                    <input id="id" value="${vo.id }" type="hidden"/>
                    <input type="hidden" value="${areaId }" id="areaId"/>
                </div>
</div>
            <div style="margin-left:46px;margin-top:43px;" class="unit">
                学年名称：
                <input style="margin-left: 27px;" class="required digits" id="startYear" minlength="4" maxlength="4" type="text" value="${vo.startYear }" size="4" name="">
                <span class="">至</span>
                <input class="required digits" id="endYear" minlength="4" maxlength="4" type="text" value="${vo.endYear }" size="4" name="">
                学年
            </div>
            <div style="margin-left:46px;margin-top:43px;" class="unit">
                日期范围：
                <input style="margin-left: 27px;" type="text" id="startTime"  value="${vo.startTime}" class="date readonly valid required"  readonly="true">
                至
                <input type="text" id="endTime" value="${vo.endTime }" class="date readonly valid required"  readonly="true">
            </div>
        </div>
            <div class="row btn-group-m-t">
                <div class="col-sm-10" style="text-align: center">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="PtSchoolYearInfoDlg.editSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="PtSchoolYearInfoDlg.close()"/>
                </div>
            </div>
        </div>

</div>
<script src="${ctxPath}/static/modular/system/ptSchoolYearTerm/ptSchoolYear.js"></script>

<style>
    .unit {
        display: block;
        padding: 5px 0;
        position: relative;
        clear: both;
        margin-left: 102px;
    }
</style>
<script>
    //开始时间时间
    let start_a = laydate.render({
        elem: '#startTime',
        trigger: 'click', //采用click弹出
        theme: '#3278F0',
        format: 'yyyy.MM.dd',
        done: function (value, date, endDate) {
            end.config.min = {
                year: date.year,
                month: date.month - 1,
                date: date.date,
            }; //开始日选好后，重置结束日的最小日期
            end.config.value = {
                year: date.year,
                month: date.month - 1,
                date: date.date,
            }; //将结束日的初始值设定为开始日
        }
    });

    //结束时间
    let end = laydate.render({
        elem: '#endTime',
        trigger: 'click', //采用click弹出
        theme: '#3278F0',
        format: 'yyyy.MM.dd',
        done: function (value, date, endDate) {
            start_a.config.max = {
                year: date.year,
                month: date.month - 1,
                date: date.date,
            }; //结束日选好后，重置开始日的最大日期
        }
    });
</script>
@}
